//
//  FirstViewController.m
//  07-UIViewControllerLifeCycle
//
//  Created by dllo on 16/7/22.
//  Copyright © 2016年 DM.C. All rights reserved.
//

#import "FirstViewController.h"

@interface FirstViewController ()

@end

@implementation FirstViewController
// push一个新的视图控制器时
// loadView, viewDidLoad, viewWillAppear
// 以上三个方法会插在上一个说视图控制器的viewWillDisappear和viewDidDisappear
- (void)loadView {
    [super loadView];
     NSLog(@"%@ ----- %s",[self class], __FUNCTION__);
}
//
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor redColor];
     NSLog(@"%@ ----- %s",[self class], __FUNCTION__);
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    NSLog(@"%@ ----- %s",[self class], __FUNCTION__);
}
//
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    NSLog(@"%@ ----- %s",[self class], __FUNCTION__);
}
//
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    NSLog(@"%@ ----- %s",[self class], __FUNCTION__);
}
//
- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    NSLog(@"%@ ----- %s",[self class], __FUNCTION__);
}

/*
 #pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
